<?php

//供应商信息
Route::group(['middleware' => ['auth']], function(){
    Route::get('supplier/qrcode', 'IndexController@qrcode');
});

//商品管理-商品管理
Route::group(['middleware' => ['auth', 'permission'], 'prefix' => 'supplier/goods', 'namespace' => 'Goods'], function(){
    Route::get('lists', 'GoodsController@lists');//列表
    Route::get('detail', 'GoodsController@detail');//详情
    Route::post('create', 'GoodsController@create');//添加
    Route::post('update', 'GoodsController@update');//编辑
    Route::post('delete', 'GoodsController@delete');//删除
    Route::post('multiDelete', 'GoodsController@multiDelete');//批量删除
    Route::get('getOpLogs', 'GoodsController@getOpLogs');//操作日志
});

//货柜管理-格子管理
Route::group(['middleware' => ['auth', /*'permission'*/], 'prefix' => 'client/cabinet/cell', 'namespace' => 'Cabinet'], function(){
    Route::get('lists', 'CabinetCellController@lists');//列表
    Route::get('detail', 'CabinetCellController@detail');//详情
    Route::post('create', 'CabinetCellController@create');//添加
    Route::post('update', 'CabinetCellController@update');//编辑
    Route::post('delete', 'CabinetCellController@delete');//删除
    Route::post('multiDelete', 'CabinetCellController@multiDelete');//批量删除
    Route::get('getOpLogs', 'CabinetCellController@getOpLogs');//操作日志
});

//货柜管理-报修申请
Route::group(['middleware' => ['auth', /*'permission'*/], 'prefix' => 'client/apply/repair', 'namespace' => 'Apply'], function(){
    Route::get('lists', 'RepairController@lists');//列表
    Route::get('detail', 'RepairController@detail');//详情
    Route::post('create', 'RepairController@create');//添加
    Route::post('update', 'RepairController@update');//修改
    Route::post('delete', 'RepairController@delete');//删除
    Route::post('multiDelete', 'RepairController@multiDelete');//批量删除
    Route::get('getOpLogs', 'RepairController@getOpLogs');//操作日志
});

//货柜管理-换货申请
Route::group(['middleware' => ['auth', /*'permission'*/], 'prefix' => 'client/apply/exchange', 'namespace' => 'Apply'], function(){
    Route::get('lists', 'ExchangeController@lists');//列表
    Route::get('detail', 'ExchangeController@detail');//详情
    Route::post('create', 'ExchangeController@create');//添加
    Route::post('delete', 'ExchangeController@delete');//删除
    Route::post('multiDelete', 'ExchangeController@multiDelete');//批量删除
    Route::get('getOpLogs', 'ExchangeController@getOpLogs');//操作日志
    
    Route::get('goods/lists', 'ExchangeController@goodsLists');//商品列表
    Route::get('goods/detail', 'ExchangeController@goodsDetail');//商品详情
});

//员工管理-员工管理
Route::group(['middleware' => ['auth', 'permission'], 'prefix' => 'client/staff', 'namespace' => 'Staff'], function(){
    Route::get('lists', 'StaffController@lists');//列表
    Route::get('detail', 'StaffController@detail');//详情
    Route::post('create', 'StaffController@create');//添加
    Route::post('update', 'StaffController@update');//编辑
    Route::post('delete', 'StaffController@delete');//删除
    Route::post('close', 'StaffController@close');//关闭
    Route::post('passApply', 'StaffController@passApply');//审核通过
    Route::post('rejectApply', 'StaffController@rejectApply');//审核驳回
    Route::post('multiClose', 'StaffController@multiClose');//批量关闭
    Route::post('multiPassApply', 'StaffController@multiPassApply');//批量通过
    Route::post('multiRejectApply', 'StaffController@multiRejectApply');//批量驳回
    Route::post('multiDelete', 'StaffController@multiDelete');//批量删除
    Route::get('getOpLogs', 'StaffController@getOpLogs');//操作日志
});

//数据统计-使用记录
Route::group(['middleware' => ['auth', 'permission'], 'prefix' => 'client/orders', 'namespace' => 'Orders'], function(){
    Route::get('lists', 'OrdersController@lists');//列表
    Route::get('detail', 'OrdersController@detail');//详情
    Route::post('create', 'OrdersController@create');//添加
    Route::post('update', 'OrdersController@update');//编辑
    Route::post('delete', 'OrdersController@delete');//删除
    Route::post('multiDelete', 'OrdersController@multiDelete');//批量删除
    Route::get('getOpLogs', 'OrdersController@getOpLogs');//操作日志
});

//数据统计-统计报表
Route::group(['middleware' => ['auth', 'permission'], 'prefix' => 'client/stats', 'namespace' => 'Stats'], function(){
    Route::get('index', 'StatsController@index');//统计报表
});

//意见反馈-反馈管理
Route::group(['middleware' => ['auth', 'permission'], 'prefix' => 'client/feedback', 'namespace' => 'Feedback'], function(){
    Route::get('lists', 'FeedbackController@lists');//列表
    Route::get('detail', 'FeedbackController@detail');//详情
    Route::post('create', 'FeedbackController@create');//添加
    Route::post('update', 'FeedbackController@update');//编辑
    Route::post('delete', 'FeedbackController@delete');//删除
    Route::post('multiDelete', 'FeedbackController@multiDelete');//批量删除
    Route::get('getOpLogs', 'FeedbackController@getOpLogs');//操作日志
});